package org.origin.ferret.system.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.origin.ferret.system.model.vo.menu.SysMenuVo;
import org.origin.ferret.system.model.vo.user.SysUserVo;
import org.origin.ferret.system.model.vo.user.SysUsersVo;

import java.util.List;

/**
 * 系统用户对象-转换
 * SysUsersMapstruct INSTANCE = Mappers.getMapper(SysUsersMapstruct.class);
 *
 * @author ferret
 * @version 2024-05-08
 */
@Mapper(componentModel = "spring")
public interface SysUsersMapstruct {

    @Mapping(target = "menus", source = "menus")
    SysUsersVo toUsers(SysUserVo userVo, List<SysMenuVo> menus);

}
